#!/usr/bin/env python
#-*- coding:utf-8 -*-


def test(date=None):
    from wwpy.util.Time import Time
    date=date or Time.yesterday('')
    from wwpy.io.Source import Source
    url=lambda host:"http://10.5.12.167:50075/streamFile/dsap/rawdata/pcclick58/%s/%s-tracklog.58.com.access.log" % (date,host);
    count=0
    s=Source([url('10.4.17.65'),url('10.4.17.66')])
    for line in s.read():
        if line.find('/pc/click/listclicklog')>-1:
            #print line
            count+=1
    print count
    
if __name__ == '__main__':
    test()
